package fractal.action;

import fractal.app.AppDefine;
import fractal.view.Fractal1Panel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/** Class make action for fractal 1 panel */
public class Fractal1Action implements ActionListener {

	private String actionName;
	private Fractal1Panel fractalPanel;

	/** constructor arguments: action name, fractal 1 panel */
	public Fractal1Action(String actionName, Fractal1Panel fractalPanel) {
		this.actionName = actionName;
		this.fractalPanel = fractalPanel;
	}

	@Override
	/** action listener method */
	public void actionPerformed(ActionEvent aEvent) {
		try {
			if (this.actionName.equals(AppDefine.FREPAINT)) {
				System.err.println("Not set: " + this.actionName);

			} else if (this.actionName.equals(AppDefine.FZOOMIN)) {
				System.err.println("Not set: " + this.actionName);

			} else if (this.actionName.equals(AppDefine.FZOOMOUT)) {
				System.err.println("Not set: " + this.actionName);

			}
		} catch (Exception ex) {
			System.err.println("Fractal action error!\n" + ex.toString());
		}
	}
}
